#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int arr[10][10] = {0};

	int n = 10;
	if (n >= 1)
	{
		arr[0][0] = 1;
	}
	if (n >= 2)
	{
		arr[1][0] = 1;
		arr[1][1] = 1;
	}

	int i = 0;
	for (i = 2; i < n; i++)
	{	
		int j = 0;
		for (j = 0; j < 10; j++)
		{
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
		}
	}

	for (i = 0; i < 10; i++)
	{
		int j = 0;
		for (j = 0; j <= i; j++)
		{
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}

	return 0;
}